/********************************************************
Project name: OOP - Home Assignment no. 3

Authors: Rami Berkovsky
         Ofir Cohen

File name: Interpreter.h

Purpose: Interpreter for assembly-like instructions.
         To be more specific, this file specifies the header declaration
         for the interpreter class with all its relevent attributes and operations.

********************************************************/

#ifndef _INTERPRETER_H_
#define _INTERPRETER_H_

#include <string>
#include "Dispatcher.h"
#include "Parser.h"
#include "Exceptions.h"

using namespace std;

class Interpreter {
public:
    
    static Interpreter *getInstance();
    void startInterpret(const char *filename);

protected:
    Interpreter() {};                               // default constructor receiving non-arguments
    ~Interpreter() {                                // default destructor
        if (_instance != NULL)
            delete _instance;
    };
    Interpreter(const Interpreter &p) {};           // override default copy-constructor to avoid
                                                    // duplicating the object of the class

private:
	static Interpreter* _instance;
    Parser p;
    Dispatcher d;
};


#endif